package thorsten.wordlist.parser;

import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class ElementCounterOutputHandler  extends DefaultHandler{
	private long elementCount = 0;

	@Override
	public void endElement(String uri, String localName, String qName) throws SAXException {
		this.elementCount++;
		super.endElement(uri, localName, qName);
	}

	@Override
	public void endDocument() throws SAXException {
		System.out.println("Dokument beendet");
		System.out.println(this.elementCount + " Elemente gesamt");
		super.endDocument();
	}	
}
